<template>
  <div class="faq_container">
    <div>
      <van-nav-bar :fixed="true" title="FAQ" @click-left="onClickLeft">
        <template #left>
          <van-icon :name="arrow" size="18" />
        </template>
      </van-nav-bar>
    </div>
    <div class="info">
      <div class="info_box" v-for="(item, index) in infoList" :key="index">
        <div class="icon">
          <img :src="item.icon" alt="info1">
        </div>
        <div class="content">{{ item.content }} </div>
      </div>
    </div>
    <!-- Frequently Asked Questions -->
    <div class="title">Frequently Asked Questions</div>
    <div class="list">
      <div class="contant" v-for="(item, index) in 8" :key="index">
        <div class="title">How to keep your funds safe</div>
        <div class="img">
          <img src="../../../assets/images/user/plus.png" alt="plus">
        </div>
      </div>
    </div>
  </div>
</template>

<script setup name='Faq'>
import { reactive, ref, onMounted, defineEmits, defineProps, defineExpose } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { userStore } from '@/store'
import arrow from '@/assets/images/user/arrow.png'
import info1 from '@/assets/images/home/info1.png'
import info2 from '@/assets/images/home/info2.png'
import info3 from '@/assets/images/home/info3.png'
// 初始化仓库
const store = userStore()
// 变量区
const router = useRouter()
const route = useRoute()
const state = ref('')
// scroll
const infoList = ref([
  {
    icon: info1,
    content: 'Rellable Security Guarantee'
  },
  {
    icon: info2,
    content: 'Stable andReliable Investment'
  },
  {
    icon: info3,
    content: 'Convenient  and Easy Operation'
  },
])


// 代码区

const onClickLeft = () => {
  history.back()
  store.SET_PATH_DATA('yes')

}

onMounted(() => {

})

// 将组件中的数据进行暴露出去
defineExpose({

})
</script>

<style lang="scss" scoped>
.faq_container {

  .info {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    padding-top: 120px;

    .info_box {
      width: 206px;
      height: 224px;
      background: #fff;
      border-radius: 15px;

      .icon {
        width: 40px;
        height: 40px;
        margin-left: 20px;

        img {
          width: 100%;
          height: 100%;
        }
      }

      .content {
        margin-left: 20px;
        margin-top: 40px;
        font-weight: 700;
        font-size: 28px;
      }
    }
  }

  .title {
    font-size: 36px;
    font-weight: 700;
    margin-left: 30px;
    color: #000;
    margin-bottom: 40px;
  }

  .list {
    padding: 0px 30px 30px;
    width: 100%;
    // margin-bottom: 100px;

    .contant {
      display: flex;
      justify-content: space-between;
      width: 100%;
      height: 110px;
      background: #fff;
      margin-left: 50%;
      transform: translateX(-50%);
      border-radius: 20px;
      margin-bottom: 30px;

      .title {
        font-size: 28px;
        color: #000;
        margin-top: 20px;
      }

      .img {
        width: 48px;
        height: 48px;
        margin-right: 30px;

        img {
          width: 100%;
          height: 100%;
        }
      }
    }
  }
}
</style>